package entities;

import java.math.BigDecimal;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "BOETE")
@AttributeOverrides({
	@AttributeOverride(name = "prijs", column = @Column(name = "prijs")),
	@AttributeOverride(name = "betaald", column = @Column(name = "betaald"))
})
public class Boete extends Betaling
{
	private Lening lening;
	
	// Constructors
	
	/**
	 * Constructor voor Hibernate
	 */
	@SuppressWarnings("unused")
	private Boete()
	{
		super();
	}
	public Boete(Lening lening, BigDecimal prijs)
	{
		super(prijs);
		this.lening = lening;
	}
	
	// Getters en Setters
	
	@OneToOne(cascade = CascadeType.ALL)
	public Lening getLening()
	{
		return lening;
	}
	public void setLening(Lening lening)
	{
		this.lening = lening;
	}
	
	// Methoden
}
